var http = require('http');

http.createServer(function (request, response) {

    // 发送HTTP头部 状态值: 200 OK 内容类型: text/plain
    response.writeHead(200, {'Content-Type': 'text/plain'});

    var data = {
        name: 'value',
        url: 'http://localhost:63343/H5Demo/public/html/index.html'
    };

    var fs = require('fs');
    var data = fs.readFileSync('video_data', 'utf-8');

    // 发送响应数据
    response.end(JSON.stringify(data));

}).listen(8888);

// 终端打印如下信息
console.log('Server running at http://127.0.0.1:8888/');

